Open
Conversation
Fixes dotnet#51310 Address all the comments in this issue.
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request addresses all feedback points from issue #51310 regarding the C# interpolated string handler tutorial. The changes improve the tutorial by adding missing implementation details, clarifying behaviors, and simplifying examples.
Changes:
- Added implementation for
AppendFormattedwith alignment and format parameters - Replaced custom
GetFormattedText()method with standardToString()override in all logger versions - Added documentation notes about constant interpolated strings and empty
InterpolatedStringHandlerArgumentAttributebehavior - Simplified the side-effects demonstration from 5 increments to 1 increment per loop iteration
- Updated target framework from net8.0 to net10.0
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| logger-v4.cs | Added AppendFormatted overload with alignment parameter and replaced GetFormattedText with ToString override |
| logger-v3.cs | Replaced GetFormattedText with ToString override |
| Logger-v2.cs | Replaced GetFormattedText with ToString override |
| Version_4_Examples.cs | Simplified side-effects example to use single increment instead of five |
| interpolated-string-handler.md | Added two notes explaining constant interpolated string behavior and empty attribute behavior; updated expected output |
| interpolated-string-handler.csproj | Updated TargetFramework from net8.0 to net10.0 |
docs/csharp/advanced-topics/performance/interpolated-string-handler.md
Outdated
Show resolved
Hide resolved
docs/csharp/advanced-topics/performance/interpolated-string-handler.md
Outdated
Show resolved
Hide resolved
docs/csharp/advanced-topics/performance/interpolated-string-handler.md
Outdated
Show resolved
Hide resolved
Do a full proofread and style check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #51310
Address all the comments in this issue.
While in this file, perform a general edit pass.
Internal previews